package com.resourcestore.dao;

import java.util.List;

import com.resourcestore.dao.BaseDao;
import com.resourcestore.model.Major;
import com.resourcestore.model.MajorGroup;
import com.resourcestore.utils.tag.Pagination;

public class MajorGroupDao extends BaseDao {

	public List<MajorGroup> selectMajorGroup(){
		List<MajorGroup> list=this.queryForList("selectMajorGroup");
		return list;
	}

	public List<MajorGroup> selectMajorGroupByDepartmentId(MajorGroup majorGroup){
		List<MajorGroup> list=this.queryForList("selectMajorGroupByDepartmentId",majorGroup);
		return list;
	}
	
	public List<MajorGroup> selectMajorGroupPage(MajorGroup majorGroup,Pagination pagination){
		List<MajorGroup> list = this.queryForPage("selectMajorGroupPage", majorGroup,pagination);
		return list;
	}
	
	public int queryMajorGroupNum(MajorGroup majorGroup) {
		return this.queryNum("selectMajorGroupCount", majorGroup);
	}
	
	public MajorGroup selectMajorGroupById(MajorGroup majorGroup){
		return (MajorGroup)this.queryForObject("selectMajorGroupById", majorGroup);
	}
	
	public void insertMajorGroup(MajorGroup majorGroup){
		this.insert("insertMajorGroup", majorGroup);		
	}
	
	public void updateMajorGroup(MajorGroup majorGroup){
		this.update("updateMajorGroup", majorGroup);	
	}
	
	public void deleteMajorGroup(MajorGroup majorGroup){
		this.delete("deleteMajorGroup", majorGroup);
	}
	
	public void deleteMoreMajorGroup(MajorGroup majorGroup){
		this.delete("deleteMoreMajorGroup", majorGroup);
	}
}
